{% extends "@admin/index.twig" %}

{% if app.route.name == 'admin_categories_add'  %}
        {% set action = 'Добавяне' %}
    {% else %}
        {% set action = 'Редактиране' %}
{% endif %}
    
{% set title = 'Категория: ' ~ action %}

{% block content %}
    {% if message is defined %}
        <div class="alert {{ message.type }}">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ message.text }}
        </div>
    {% endif %}
    <legend class='col-md-offset-1 col-md-10'>{{ action }}</legend>
    {{ form.render|raw }}
{% endblock content %}